package com.yupi.usercenter.exception;

import lombok.Data;

/**
 * 异常枚举类
 */
public enum UserCenterExceptionEnum {

    /**
     * 参数异常
     */
    PARAMS_ERROR(10002, "参数异常"),
    SYSTEM_ERROR(20000, "系统异常，请从控制台或日志中查看具体错误信息");

    /**
     * 异常码
     */
    Integer code;
    /**
     * 异常信息
     */
    String msg;

    public static final Integer DEFAULT_ERROR_CODE = 10001;

    UserCenterExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
